/* 
 * File:   Schedule.cpp
 * Author: Allison
 * 
 * Created on September 30, 2013, 7:26 PM
 */

#include "Schedule.h"

Schedule::Schedule() {
}

Schedule::~Schedule() {
}

void Schedule::setDays(string days) {
    this->days = days;
}

string Schedule::getDays() const {
    return days;
}

void Schedule::setTime(string time) {
    this->time = time;
}

string Schedule::getTime() const {
    return time;
}

int Schedule::compareTo(Schedule other) {
    int result;
    if (days == other.days)
        result = time.compare(other.time);
    else
        result = days.compare(other.days);

    return result;
}

//toString method creates a string containing values of
//instance variables using the specified format and returns it
string Schedule::toString() {
    string scheduleString;

    scheduleString = days + "," + time;

    return scheduleString;
}
